package com.wangcang.widgetlibrary.pageindicator;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.wangcang.widgetlibrary.R;

public class MyPageFragment extends Fragment {

    View v = null;
    TextView tv = null;
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        v = inflater.inflate(R.layout.fragment_page_indicator, container, false);
        tv = (TextView) v.findViewById(R.id.tv);
        return v;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        Bundle b = getArguments();
        tv.setText("这是第" + b.getInt("index") + "页");
    }
}
